package org.jeecg.modules.logistics.manage.hw_info.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.logistics.manage.hw_info.entity.HwInfo;
import org.jeecg.modules.logistics.manage.hw_info.service.IHwInfoService;
import org.jeecg.modules.logistics.manage.hz_info.entity.HzInfo;
import org.jeecg.modules.logistics.table.hw.entity.Hw;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Info:
 * @Author: 唐小尊
 * @Date: 2019/12/4  18:50
 * @Version: V1.0
 */
@Slf4j
@Api(tags = "货物全部信息")
@RestController
@RequestMapping("/my/hwInfo")
public class HwInfoController {
    @Autowired
    IHwInfoService hwInfoService;

    /**
     * 得到一个货主信息
     *
     * @return
     */
    @AutoLog(value = "得到一个货主信息")
    @ApiOperation(value = "得到全部货物信息", notes = "得到一个货主信息")
    @GetMapping(value = "/getAllHwInfo")
    public Result<List<HwInfo>> getAllHwInfo() {
        Result<List<HwInfo>> result = new Result<List<HwInfo>>();
        List<HwInfo> hwInfoList = hwInfoService.getAllHwInfo();
        result.setResult(hwInfoList);
        return result;
    }
}
